import os

from py_page.base_page import BasePage
from common.log import Logger


logging = Logger(__name__).get_logger()

class LoginPage(BasePage):

    file_path = BasePage.get_path("/py_yaml/login_page.yaml")

    # 使用正确的账号密码进行登录
    def use_right_account_login(self, account, pwd):
        logging.info(f"使用正确的密码进行登录，输入的账号：{account},密码是：{pwd}")
        self.run_steps(self.file_path, "use_right_account_login", account=account, pwd=pwd)
        from py_page.main_page import MainPage
        return MainPage(self.driver)

